package collection;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class Test2 {
    @Test
    public void test() {
        List<String> list = new ArrayList<>();
        list.add("aaa");
        list.add("bbb");
        list.add("qqq");

        for (int i = 0; i < list.size(); i++)
            System.out.print(list.get(i) + " ");
        System.out.println();

        for (String s : list)
            System.out.print(s + " ");
        System.out.println();
    }
}
